From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:02:22 +0000 (-0600) Subject: minor cleanups (#1361) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2^2~28 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=74caabaf72e3ddfcc14f9f341643c2577ddfd961;p=gpsbabel.git minor cleanups (#1361) * resolve minor nits * grammar --- diff --git a/filter_vecs.cc b/filter_vecs.cc index 6be8c048f..5f7a42a96 100644 --- a/filter_vecs.cc +++ b/filter_vecs.cc @@ -61,7 +61,7 @@ template Filter* fltfactory() { - static_assert(std::is_base_of::value, "T must be derived from Filter"); + static_assert(std::is_base_of_v, "T must be derived from Filter"); return new T(); } diff --git a/rgbcolors.cc b/rgbcolors.cc index 564c659d3..a7f03dec4 100644 --- a/rgbcolors.cc +++ b/rgbcolors.cc @@ -19,7 +19,7 @@ */ -#include // for assert +#include // for assert #include // for QByteArray #include // for QHash diff --git a/vecs.cc b/vecs.cc index 54d26690b..7e34a9f06 100644 --- a/vecs.cc +++ b/vecs.cc @@ -83,12 +83,10 @@ #include "googletakeout.h" // for GoogleTakeoutFormat -#define MYNAME "vecs" - template Format* fmtfactory(const QString& filename) { - static_assert(std::is_base_of::value, "T must be derived from Format"); + static_assert(std::is_base_of_v, "T must be derived from Format"); return new T(filename); } @@ -490,7 +488,7 @@ Vecs& Vecs::Instance() * that we are not modifying a Qt COW copy. * Qt has an undocumented but public member function isDetached(). * If the list is detached it implies it is not shared, then functions - * then might detach, like the iterator begin which is implicitly used + * that might detach, like the iterator begin which is implicitly used * in the range based for loop, won't cause a copy to be created. * We can make sure this is true for at least our regression cases * with assertions. @@ -498,8 +496,8 @@ Vecs& Vecs::Instance() * so we have to exclude this from the check. * The possibility of detachment is also why the type of element * on the list must be default constructable. This is why we have - * to supply a default for any const members of arglist_t. Without - * the default the default constructor would be implicitly deleted. + * to supply a default for any const members of arglist_t. Without the + * default intializer the default constructor would be implicitly deleted. */ void Vecs::init_vec(Format* fmt) @@ -752,9 +750,9 @@ void Vecs::prepare_format(const fmtinfo_t& fmtdata) } /* - * For style based formats let xcsv know the style file. Otherwise + * For style based formats let xcsv know the style file. Otherwise, * make sure xcsv knows no style file is in use. This covers the case - * that we are processing xcsv,style= and it was preceeded by an xcsv + * that we are processing xcsv,style= and it was preceded by a xcsv * format that utilized an internal style file. */ auto* xcsvfmt = dynamic_cast(fmtdata.fmt); @@ -806,7 +804,7 @@ QString Vecs::get_option(const QStringList& options, const QString& argname) QString rval; // null for (const auto& option : options) { - int split = option.indexOf('='); + auto split = option.indexOf('='); const QString option_name = option.left(split); if (option_name.compare(argname, Qt::CaseInsensitive) == 0) { /* diff --git a/xmlgeneric.cc b/xmlgeneric.cc index 792bd0574..29c8bf362 100644 --- a/xmlgeneric.cc +++ b/xmlgeneric.cc @@ -84,7 +84,7 @@ XmlGenericReader::xml_common_init(const QString& fname, const char* encoding, std::for_each(ignorelist.cbegin(), ignorelist.cend(), [this](const QString& tag)->void { xg_shortcut_taglist.insert(tag, xg_shortcut::sc_ignore); }); - + std::for_each(skiplist.cbegin(), skiplist.cend(), [this](const QString& tag)->void { xg_shortcut_taglist.insert(tag, xg_shortcut::sc_skip); });